
local RoleCtrl={}

function RoleCtrl:init()
    NetEngine:registerCallback(ProtoCmd.ResErrRoleMessage,function(msg)
        Alert:show("",string.format(configData.cfg_err[msg.err].info,unpack(msg.params)),Alert.TYPE_YES_NO,function()
            --MyApp:restart()
        end)
    end)
end

function RoleCtrl:clean()
    NetEngine:unregisterCallback(ProtoCmd.ResErrRoleMessage)
end

return RoleCtrl
